﻿var HashTable = Class.create();
HashTable.prototype=
{
    initialize:function()
    {
        this._content ={};
    },
    Count:function()
    {
        var count = 0;
        for(var i in this._content) count++;
        return count;
    },
    Items:function(key)
    {
        if(this.Contains(key))
        {
            return this._content[key];
        }
    },
    Add:function(key,value)
    {
        if(this._content.hasOwnProperty(key)) 
        {
            return false;
        }
        else
        {
            this._content[key] = value;
            return true;
        }
    },
    Clear:function()
    {
        this._content  = {};
    },
    Contains:function(key)
    {
        return this._content.hasOwnProperty(key);
    },
    Remove:function(key)
    {
        delete this._content[key];
    }
}